//
// CPatchDLMPointLight.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class CPatchDLMPointLight {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPatchDLMPointLight(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPatchDLMPointLight obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPatchDLMPointLight(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setR(float value) {
    nel3dJNI.CPatchDLMPointLight_R_set(swigCPtr, this, value);
  }

  public float getR() {
    return nel3dJNI.CPatchDLMPointLight_R_get(swigCPtr, this);
  }

  public void setG(float value) {
    nel3dJNI.CPatchDLMPointLight_G_set(swigCPtr, this, value);
  }

  public float getG() {
    return nel3dJNI.CPatchDLMPointLight_G_get(swigCPtr, this);
  }

  public void setB(float value) {
    nel3dJNI.CPatchDLMPointLight_B_set(swigCPtr, this, value);
  }

  public float getB() {
    return nel3dJNI.CPatchDLMPointLight_B_get(swigCPtr, this);
  }

  public void setIsSpot(boolean value) {
    nel3dJNI.CPatchDLMPointLight_IsSpot_set(swigCPtr, this, value);
  }

  public boolean getIsSpot() {
    return nel3dJNI.CPatchDLMPointLight_IsSpot_get(swigCPtr, this);
  }

  public void setPos(CVector value) {
    nel3dJNI.CPatchDLMPointLight_Pos_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getPos() {
    long cPtr = nel3dJNI.CPatchDLMPointLight_Pos_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void setDir(CVector value) {
    nel3dJNI.CPatchDLMPointLight_Dir_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getDir() {
    long cPtr = nel3dJNI.CPatchDLMPointLight_Dir_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void setCosMax(float value) {
    nel3dJNI.CPatchDLMPointLight_CosMax_set(swigCPtr, this, value);
  }

  public float getCosMax() {
    return nel3dJNI.CPatchDLMPointLight_CosMax_get(swigCPtr, this);
  }

  public void setCosMin(float value) {
    nel3dJNI.CPatchDLMPointLight_CosMin_set(swigCPtr, this, value);
  }

  public float getCosMin() {
    return nel3dJNI.CPatchDLMPointLight_CosMin_get(swigCPtr, this);
  }

  public void setOOCosDelta(float value) {
    nel3dJNI.CPatchDLMPointLight_OOCosDelta_set(swigCPtr, this, value);
  }

  public float getOOCosDelta() {
    return nel3dJNI.CPatchDLMPointLight_OOCosDelta_get(swigCPtr, this);
  }

  public void setAttMax(float value) {
    nel3dJNI.CPatchDLMPointLight_AttMax_set(swigCPtr, this, value);
  }

  public float getAttMax() {
    return nel3dJNI.CPatchDLMPointLight_AttMax_get(swigCPtr, this);
  }

  public void setAttMin(float value) {
    nel3dJNI.CPatchDLMPointLight_AttMin_set(swigCPtr, this, value);
  }

  public float getAttMin() {
    return nel3dJNI.CPatchDLMPointLight_AttMin_get(swigCPtr, this);
  }

  public void setOOAttDelta(float value) {
    nel3dJNI.CPatchDLMPointLight_OOAttDelta_set(swigCPtr, this, value);
  }

  public float getOOAttDelta() {
    return nel3dJNI.CPatchDLMPointLight_OOAttDelta_get(swigCPtr, this);
  }

  public void setBSphere(SWIGTYPE_p_NLMISC__CBSphere value) {
    nel3dJNI.CPatchDLMPointLight_BSphere_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CBSphere.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CBSphere getBSphere() {
    return new SWIGTYPE_p_NLMISC__CBSphere(nel3dJNI.CPatchDLMPointLight_BSphere_get(swigCPtr, this), true);
  }

  public void setBBox(SWIGTYPE_p_NLMISC__CAABBox value) {
    nel3dJNI.CPatchDLMPointLight_BBox_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CAABBox getBBox() {
    long cPtr = nel3dJNI.CPatchDLMPointLight_BBox_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CAABBox(cPtr, false);
  }

  public void compile(CPointLight pl, CRGBA landDiffMat, float maxAttEnd) {
    nel3dJNI.CPatchDLMPointLight_compile__SWIG_0(swigCPtr, this, CPointLight.getCPtr(pl), pl, CRGBA.getCPtr(landDiffMat), landDiffMat, maxAttEnd);
  }

  public void compile(CPointLight pl, CRGBA landDiffMat) {
    nel3dJNI.CPatchDLMPointLight_compile__SWIG_1(swigCPtr, this, CPointLight.getCPtr(pl), pl, CRGBA.getCPtr(landDiffMat), landDiffMat);
  }

  public CPatchDLMPointLight() {
    this(nel3dJNI.new_CPatchDLMPointLight(), true);
  }

}
